﻿@using System.Web.Mvc.Ajax
@using Microsoft.Web.Mvc.Html
@using nanoCMS.Blog.WebUI.Models
@model BlogCategoryVM 

<script type="text/javascript">
function formSuccess(data) {
    if(data == "removeForm") {
        jQuery("#editForm").remove();
        window.location.reload();
    }
};

</script>



@using (Ajax.BeginForm("EditBlogCategory", "BlogCategory", new { }, new AjaxOptions { OnSuccess = "formSuccess", UpdateTargetId = "Partial" }, new {id="editForm"})) {
    <div id="partial">
    @{ Html.RenderPartial("EditBlogFieldsPartial", Model); }
    </div>
    <input type="hidden" name="BlogCategoryID" value="@Model.BlogCategoryID" />
    
    <input type="submit" />
}
